﻿package org.nickro.project.utils{
    import flash.text.TextField;

    public class TextFields {

        public function TextFields(){
            throw (new Error("ERROR com.tobyfreeman.utils.TextFields constructor: Class never intended to be instantiated"));
        }
        public static function cloneProperties(fromField:TextField, toField:TextField):void{
            toField.x = fromField.x;
            toField.y = fromField.y;
            toField.width = fromField.width;
            toField.height = fromField.height;
            toField.alwaysShowSelection = fromField.alwaysShowSelection;
            toField.antiAliasType = fromField.antiAliasType;
            toField.autoSize = fromField.autoSize;
            toField.background = fromField.background;
            toField.backgroundColor = fromField.backgroundColor;
            toField.border = fromField.border;
            toField.borderColor = fromField.borderColor;
            toField.condenseWhite = fromField.condenseWhite;
            toField.displayAsPassword = fromField.displayAsPassword;
            toField.embedFonts = fromField.embedFonts;
            toField.gridFitType = fromField.gridFitType;
            toField.maxChars = fromField.maxChars;
            toField.mouseWheelEnabled = fromField.mouseWheelEnabled;
            toField.multiline = fromField.multiline;
            toField.restrict = fromField.restrict;
            toField.scrollH = fromField.scrollH;
            toField.scrollV = fromField.scrollV;
            toField.selectable = fromField.selectable;
            toField.sharpness = fromField.sharpness;
            toField.styleSheet = fromField.styleSheet;
            toField.textColor = fromField.textColor;
            toField.thickness = fromField.thickness;
            toField.type = fromField.type;
            toField.useRichTextClipboard = fromField.useRichTextClipboard;
            toField.wordWrap = fromField.wordWrap;
            toField.defaultTextFormat = fromField.defaultTextFormat;
            toField.setTextFormat(fromField.getTextFormat());
            toField.htmlText = fromField.htmlText;
            toField.setSelection(fromField.selectionBeginIndex, fromField.selectionEndIndex);
        }

    }
}
